<template>
	<view class="listHtml content bgf8">
		<view class="menu">
			<view class="li" :class="{ select: item.check }" v-for="item in menu" @click="changeState(item)">
				<view class="n">{{ item.name }}</view>
			</view>
		</view>
		<view class="dateOrg">
			<view class="dateInp" :class="{ colorC: !startTime}" @click="open">{{startTime || "开始时间"}}</view>
			<view class="dateInp" :class="{ colorC: !endTime }" @click="open">{{endTime || "结束时间"}}</view>
		</view>
		<uni-calendar ref="calendar" range :insert="false" @confirm="confirm" />
		<scroll-view :scroll-top="scrollTop" scroll-y="true" class="scroll-Y" @scrolltoupper="upper" @scrolltolower="lower" @scroll="scroll">
			<view class="listUl">
				<view class="li" v-for="item in list">
					<navigator :url="'/pages/caseDetail/caseDetail?id=' + item.id" hover-class="navigator-hover">
						<view class="box">
							<view class="img">
								<template v-if="item.img&&item.typeID==1">
									<image class="i" :src="item.img" mode="aspectFit"></image>
								</template>
								<template v-else>
									<image class="i" src="http://wggl.cqyz.gov.cn/wechat/images/icon/attr.jpg" mode="aspectFit"></image>
								</template>
							</view>
							<view class="font">
								<view class="n">{{item.title}}</view>
								<view class="des">
									<view class="label">案件类型：</view>
									<view class="v">{{ item.typeName }}</view>
								</view>
								<view class="des">
									<view class="label">上报时间：</view>
									<view class="v" style="font-size: 10px;">{{ item.publishTime }}</view>
								</view>
							</view>
						</view>
					</navigator>
					<view class="btnBox">
						<template v-if="filters.typeId==1">
							<template v-if="item.status==1">
								<button class="twoBtn btnM l" @click="openProp(item)">转交</button>
								<button class="twoBtn btnMi r" @click="openProp(item,1)">处置</button>
							</template>
							<template v-if="item.status==4">
								<button class="allBtn btnMi" @click="openProp(item,1)">处置</button>
							</template>
						</template>
						<template v-if="filters.typeId==2">
							<template v-if="item.status==1">
								<button class="allBtn btnMi" @click="openProp(item)">转交</button>
							</template>
							<template v-if="item.status==2||item.status==4">
								<button class="allBtn btnMi" @click="toDetail(item,2)">审核</button>
							</template>
						</template>
					</view>
				</view>
			</view>
		</scroll-view>
		<uni-popup ref="popup" type="dialog" :mask-click="false">
			<uni-popup-dialog ref="dialog" mode="base" title="" content="您确认认领?" @confirm="popupConfirm"></uni-popup-dialog>
		</uni-popup>
		<uni-popup ref="popup2" type="dialog">
			<uni-popup-dialog ref="dialog2" mode="base" title="" @confirm="wxtransit">
				<view class="formBase dialogForm">
					<view class="inpBox" @tap="toggleTab(1)">
						<view class="label" :class="{colorC:!item.actDef}">{{item.actDef&&item.actDef.label||'工作项'}}</view>
						<image class="arrow" src="../../static/img/arrow.png" mode=""></image>
					</view>
					<view class="inpBox" @tap="toggleTab(2)">
						<view class="label" :class="{colorC:!item.role}">{{item.role&&item.role.label||'分配岗位'}}</view>
						<image class="arrow" src="../../static/img/arrow.png" mode=""></image>
					</view>
					<view class="inpBox" @tap="toggleTab(3)">
						<view class="label" :class="{colorC:!item.user}">{{item.user&&item.user.label||'分配人员'}}</view>
						<image class="arrow" src="../../static/img/arrow.png" mode=""></image>
					</view>
				</view>
			</uni-popup-dialog>
		</uni-popup>
		<myxz v-if="itemShow" @onNewnation='newnation' :item="item" :selectList="selectList" :cheItem="cheItem"></myxz>

	</view>
</template>

<script>
	import list from './list.js';
	export default list;
</script>

<style>

</style>